package com.example.yunJie.digitalSentry.service.impl;


import com.example.yunJie.digitalSentry.entity.ShiftEntity;
import com.example.yunJie.digitalSentry.mapper.one.ShiftMapper;
import com.example.yunJie.digitalSentry.service.ShiftService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

@Service
@RequiredArgsConstructor
public class ShiftServiceImpl implements ShiftService {

    private final ShiftMapper shiftMapper;

    @Override
    public int insert(ShiftEntity shiftEntity) {
        return shiftMapper.insert(shiftEntity);
    }

    @Override
    public int update(ShiftEntity shiftEntity) {
        return shiftMapper.update(shiftEntity);
    }

    @Override
    public int deleteById(Serializable id) {
        return shiftMapper.deleteById(id);
    }

    @Override
    public int deleteIdList(Long[] idList) {
        return shiftMapper.deleteIdList(idList);
    }

    @Override
    public ShiftEntity findId(String id) {
        return shiftMapper.findId(id);
    }

    @Override
    public List<ShiftEntity> findAll(ShiftEntity shiftEntity) {
        return shiftMapper.findAll(shiftEntity);
    }

    @Override
    public List<ShiftEntity> findByMarketNameAndPostName(String marketName, String postName) {
        return shiftMapper.findByMarketNameAndPostName(marketName,postName);
    }

    @Override
    public List<ShiftEntity> findAllByMarketName(String marketName) {
        return shiftMapper.findAllByMarketName(marketName);
    }

    @Override
    public List<ShiftEntity> findAllByMarketNameAndPostName(String marketName, String postName) {
        return shiftMapper.findAllByMarketNameAndPostName(marketName,postName);
    }

    @Override
    public List<ShiftEntity> findAllByMarketNameAndPostNameAndShiftName(String marketName, String postName, String shiftName) {
        return shiftMapper.findAllByMarketNameAndPostNameAndShiftName(marketName,postName,shiftName);
    }

    @Override
    public ShiftEntity findByShiftName(String shiftName) {
        return shiftMapper.findByShiftName(shiftName);
    }

    @Override
    public ShiftEntity findBy(String marketName,String postName,String shiftName) {
        return shiftMapper.findBy(marketName,postName,shiftName);
    }
}
